package org.daidai.abstrusewriting.homepage.classify.model;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * Created by Administrator on 2016/11/1.
 */

public class SpecialList implements Parcelable{
    private List<Special> specials;

    public SpecialList() {
    }

    protected SpecialList(Parcel in) {
        specials = in.createTypedArrayList(Special.CREATOR);
    }

    public static final Creator<SpecialList> CREATOR = new Creator<SpecialList>() {
        @Override
        public SpecialList createFromParcel(Parcel in) {
            return new SpecialList(in);
        }

        @Override
        public SpecialList[] newArray(int size) {
            return new SpecialList[size];
        }
    };

    public List<Special> getSpecials() {
        return specials;
    }

    public void setSpecials(List<Special> specials) {
        this.specials = specials;
    }

    @Override
    public String toString() {
        return "SpecialList{" +
                "specials=" + specials +
                '}';
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeTypedList(specials);
    }
}
